ConverTextToFMFhThis file shows how get text from a file correctly converted to and from the internal
FileMaker format.
2000 Troi Automatisering `
contents
NOTE These 2 function work transparant on both Windows and Mac OS. However on Mac no conversion is done, as the internal FileMaker format is the same as Mac OS. Test this on Windows.
ConverTextToFMFhThis file shows how get text from a file correctly converted to and from the internal
FileMaker format.
2000 Troi Automatisering `
contents
NOTE These 2 function work transparant on both Windows and Mac OS. However on Mac no conversion is done, as the internal FileMaker format is the same as Mac OS. Test this on Windows.
1- Get a text File m
2- Convert to FM format
Variant 1: First get the contents of a text file into a field, without doing any conversion. Then convert the text to FileMaker format:
x contents2y
Get a text File + convert
;AOVariant 2: Get the contents of a text file into a field, convert it right away:
To Next Sample
Close Demo File
workB
abcdefghijklmnopqrstuvwxyz{|}~
Get a File Contents
Convert TO FileMaker Format
%Get Contents and convert to FileMaker
-------------
Convert FROM FileMaker Format
SelectFile and Save in file
Write Contents to gOutputFile
*Convert and Write Contents2 to gOutputFile
SelectFile
Open file
Get a File Contents
ConverTextFromFMFhThis file shows how get text from a file correctly converted to and from the internal
FileMaker format.
2000 Troi Automatisering `
contentsi
_gErrorCodek
2- Put it in a text File m
1- Convert From FM format
ConverTextFromFMFhThis file shows how get text from a file correctly converted to and from the internal
FileMaker format.
2000 Troi Automatisering `
contentsi
_gErrorCodek
2- Put it in a text File m
1- Convert From FM format
Variant 1: Put some text with some higher ASCII characters in the field contents. Then convert the text to FileMaker format by clicking the 1st button. With the 2nd button the contents is written to file.
Convert and Write to a file
;ALVariant 2: Normally you
d convert and put it in a file right in one script:
Previous Sample~ contents2
NOTE These 2 function work transparant on both Windows and Mac OS. However on Mac no conversion is done, as the internal FileMaker format is the same as Mac OS. Test this on Windows.
Close Demo File
Helvetica
Geneva
Times New Roman
A,This script will get the contents of a file.B
|("TrFile-ContentsDialog"
"Please select a text file (with higher ASCII):")
TrFile-ContentsDialog
.Please select a text file (with higher ASCII):|
Write Contents to gOutputFile
A,This script will set the contents of a file.BI
|("TrFile-CreateFile"
TrFile-CreateFile
|("TrFile-SetDefaultFileSpec"
TrFile-SetDefaultFileSpec
|("TrFile-SetContents"
TrFile-SetContents
Cancel
The file was written.I
Cancel
An error occurred. See the layout for the error code.
Convert TO FileMaker Format
A/This will convert the text to FileMaker format.BS
|("TrFile-ConvertToFMText"
TrFile-ConvertToFMText
A%Get Contents and convert to FileMaker
AFThis script will get the contents of a file and convert it right away.B
|("TrFile-ConvertToFMText"
|("TrFile-ContentsDialog"
"Please select a text file (with higher ASCII):")
TrFile-ConvertToFMText
TrFile-ContentsDialog
.Please select a text file (with higher ASCII):||
Convert FROM FileMaker Format
A1This will convert the text FROM FileMaker format.BW
|("TrFile-ConvertFromFMText"
TrFile-ConvertFromFMText
SelectFile and Save in file
A2This script will get let the user select a folder.B
|("TrFile-Save FileSpec Dialog"
"Please specify a file:")
TrFile-Save FileSpec Dialog
Please specify a file:|C;
2) <> "$$"
-------------
A2This script will get let the user select a folder.
|("TrFile-Get FileSpec Dialog"
"Please specify a file:")
TrFile-Get FileSpec Dialog
Please specify a file:|C;
2) <> "$$"
Make it a full pathE]
|("TrFile-FileSpec To FullPath"
TrFile-FileSpec To FullPath
A*Convert and Write Contents2 to gOutputFile
A,This script will set the contents of a file.B'
|("TrFile-CreateFile"
TrFile-CreateFile
|("TrFile-SetDefaultFileSpec"
TrFile-SetDefaultFileSpec
|("TrFile-SetContents"
|("TrFile-ConvertFromFMText"
TrFile-SetContents
TrFile-ConvertFromFMText
Cancel
The file was written.J
Cancel
An error occurred. See the layout for the error code.
SelectFile
A2This script will get let the user select a folder.B